﻿@using BestTrader.Cms.ViewModels
@{
    ViewData["Title"] = "出金记录";
    var AgentManagers = ViewData["AgentManagers"] as List<ItemsDetailModel>;
    var IsFinanceAdmin = (Boolean)ViewData["IsFinanceAdmin"];

}
<blockquote class="layui-elem-quote quoteBox">
    <form class="layui-form">
        @Html.AntiForgeryToken()
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" class="layui-input searchVal" placeholder="请输入直客姓名或真实姓名" />
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" name="startdate" id="startdate" lay-verify="startdate" placeholder="开始时间" autocomplete="off" class="layui-input startdate" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" name="enddate" id="enddate" lay-verify="enddate" placeholder="结束时间" autocomplete="off" class="layui-input enddate" readonly>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-input-inline">
                <select name="searchState" class="searchState" lay-filter="searchState" lay-verify="required">
                    <option value="">订单状态</option>
                    <option value="0">待审核</option>
                    <option value="1">审核通过</option>
                    <option value="2">审核失败</option>
                </select>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-input-inline">
                <select name="searchManagerId" class="searchManagerId" lay-filter="searchManagerId" lay-verify="required">
                    <option value="">所有客户</option>
                    @foreach (var item in AgentManagers)
                    {
                        <option value="@item.ItemCode">@(item.ItemName)(@(item.ItemData))</option>
                    }
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <a class="layui-btn search_btn" data-type="reload">搜索</a>
        </div>
        @*<div class="layui-inline">
                <a class="layui-btn layui-btn-warm code_btn" style="display:none;">导出</a>
            </div>*@
    </form>
</blockquote>
<table id="managerList" lay-filter="managerList"></table>
<script type="text/html" id="managerListBar">
     @if (IsFinanceAdmin == true)
    {
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="balance">余额</a>
    }

    {{#  if(d.State === 0){ }}
    
    @if (IsFinanceAdmin == true)
    {
    <a class="layui-btn layui-btn-xs" lay-event="auditGomePay" id="btn_auditGomePay">美付宝出金</a>
    }
    <a class="layui-btn layui-btn-xs" lay-event="audit">人工出金</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="cancel">拒绝</a>
    {{#  } else{ }}
    <span>-</span>
    @*<a class="layui-btn layui-btn-sm" lay-event="preview">查看结果</a>*@
    {{#  }}}

</script>
<script type="text/html" id="State">
    {{#  if(d.State === 1){ }}
    <a class="layui-btn layui-btn-xs">审核通过</a>
    {{#  } else if(d.State === 2){ }}
    <a class="layui-btn layui-btn-xs layui-btn-disabled">审核失败</a>
    {{#  } else{ }}
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="state">待审核</a>
    {{#  }}}
</script>
<!--操作-->
@section Scripts{
    <script src="https://cdn.bootcss.com/Base64/1.0.2/base64.min.js"></script>
    <script type="text/javascript" src="~/layui-v2.4.5/layui.js"></script>
    <script type="text/javascript" src="~/js/inoutcash/outcashRecordList.js?_=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
}